Skip to content

Conversation

@danielquintas8
Copy link

feat: Add session_limit parameter to control conversation history retrieval from sessions and include new test.

…etrieval from sessions and include new test.
@danielquintas8 danielquintas8 marked this pull request as draft December 16, 2025 22:38
@danielquintas8 danielquintas8 marked this pull request as ready for review December 16, 2025 22:45
@seratch seratch added this to the 0.6.x milestone Dec 17, 2025
Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for sending this pull request! Adding the limit option is reasonable, but we'd like to make the new option to be open to future enhancement. So can you create new SessionSettings class (in the same way with ModelSettings) and move the liimt parameter as the first and only property in it?

@seratch seratch changed the title Session limit parameter on Runner Add session customization options to Runner options Dec 17, 2025
@seratch seratch changed the title Add session customization options to Runner options Add session customization params to Runner options Dec 17, 2025
@seratch seratch marked this pull request as draft December 17, 2025 08:23
@danielquintas8 danielquintas8 marked this pull request as ready for review December 17, 2025 20:47
@danielquintas8
Copy link
Author

danielquintas8 commented Dec 17, 2025

Thanks for sending this pull request! Adding the limit option is reasonable, but we'd like to make the new option to be open to future enhancement. So can you create new SessionSettings class (in the same way with ModelSettings) and move the limit parameter as the first and only property in it?

Thanks for the feedback! I've refactored the implementation, following the same pattern as ModelSettings.

Changes made:

  • Created SessionSettings dataclass with limit as the first property
  • Added session_settings parameter to all session constructors and from_url/ from_address method
  • Integrated SessionSettings into RunConfig for runtime overrides
  • Added resolve() method for merging settings (base + override)
  • Updated all 7 session implementations consistently

I believe this is extensible for future properties. For example, I'd like to add branch_id support for conversation branching in AdvancedSQLiteSession (and a potential AdvancedSQLAlchemySession). If you're open to it, I can also implement it since I need it for my use case anyway.

Let me know if it needs any adjustments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants